Allow enabling http for haproxy route backend#230
Merged
Thanhphan1147 merged 20 commits intomainfrom Nov 24, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for allowing HTTP traffic alongside HTTPS in the haproxy-route backend configuration. The main change introduces an allow_http attribute that disables mandatory HTTPS redirection for specific backends when enabled. Additionally, the PR includes a migration from tox.ini to tox.toml configuration format and various code style improvements.
- Adds
allow_httpattribute to haproxy-route library to control HTTP/HTTPS redirection behavior - Implements ACL generation logic to conditionally allow HTTP traffic based on backend configuration
- Updates HAProxy configuration template to use allow_http ACLs in redirect rules
Reviewed Changes
Copilot reviewed 38 out of 40 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/charms/haproxy/v1/haproxy_route.py | Adds allow_http parameter to RequirerApplicationData and HaproxyRouteRequirer with documentation |
| src/state/haproxy_route.py | Implements allow_http_acls property to generate ACL rules from backend configurations |
| templates/haproxy_route.cfg.j2 | Updates HTTP-to-HTTPS redirect rule to exclude allow_http ACLs |
| src/haproxy.py | Passes allow_http_acls to template rendering context |
| tests/unit/test_haproxy_route.py | Adds unit tests for allow_http functionality |
| tox.toml | Migrates from tox.ini to tox.toml configuration format |
| pyproject.toml | Updates project configuration for new tooling |
| Various test files | Code style improvements (f-string conversions, formatting fixes) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
705b4fd to
08fc285
Compare
arturo-seijas
approved these changes
Nov 24, 2025
alithethird
approved these changes
Nov 24, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Blocked until #225 is merged. Add a new
allow_httpattribute to allow disabling mandatory HTTPS redirection for backends. Add logic to build the required ACL and rendering logic in the j2 template.Checklist
docs/release-notes/artifacts.urgent,trivial,complex)